//
// Created by 文道江 on 15/12/21.
// Copyright (c) 2015 文道江. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface UploadManager : NSObject
- (instancetype)initWithUploadURL:(NSString *)uploadURL formName:(NSString *)formName;

+ (instancetype)managerWithUploadURL:(NSString *)uploadURL formName:(NSString *)formName;


+ (UploadManager *)defaultManager;

- (void)setUploadURL:(NSString *)uploadURL formName:(NSString *)formName;

- (void)uploadFile:(NSURL *)fileURL;


- (void)uploadFile:(NSURL *)fileURL
        parameters:(NSDictionary *)parameters
 completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
 sendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block;

@end